#include "cchecked.h"

CChecked::CChecked(QObject *parent) :
    QObject(parent)
{
    m_pBall = NULL;
}

bool CChecked::hasBall()
{
    if (m_pBall != NULL)
    {
        return true;
    }
    else
    {
        return false;
    }
}

void CChecked::addBall(CBall *ball)
{
    m_pBall = ball;
}

void CChecked::delBall()
{
    m_pBall = NULL;
}

void CChecked::swapBall(CBall* &destBall)
{
    CBall* pTmpBall = m_pBall;
    m_pBall = destBall;
    destBall = pTmpBall;
}


CBall* &CChecked::GetBall()
{
    return m_pBall;
}
